Conventional operating systems and applications include functions that link to other various operating system services and application sub-functions. For example, some functions may execute in a cross memory state. A cross memory state refers to a mode of execution where a function accesses a different address space from its own address space. Functions executing in a cross memory state may include a function that calls other routines residing in a different address space from the calling function. The function executing in a cross memory state may need to change its state to an alternate state (such a non-cross memory state), but making this change during execution of the function is often problematic.